StringScanner.SkipToWhitespace Function

Syntax

Result_Flag as L = SkipToWhitespace as l()

Arguments

Result_Flag

True if a white space character was found.

Description

Skip until a whitespace character is encountered. Return true if successful.

Discussion

The <StringScanner>.SkipToWhitespace() function moves the offset to the next white space character. The offset does not move if it is already pointing to a white space character. The function treats the following characters as white space.

Character
ASCII Value
space

chr(32)

tab

chr(9)

carriage return

chr(10)

line feed

chr(13)

Example

dim scanner as P
dim txt as C
txt = <<%text%
This is wonderful prose written
by a technical writer of note.
%text%
scanner = stringscanner.create(txt)
? scanner.SkipToWhitespace()
= .T.
? scanner.GetToOffset()
= "This"
? scanner.getremainder()
=is wonderful prose written
by a technical writer of note.

See Also